package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * 采购订单详情实体类
 */
@TableName("t_orderPInfo")
public class OrderPInfoBean {
   /**采购订单详情编号*/
   @TableId(value = "pk_oId",type = IdType.AUTO)
    private Integer odInfoId;

   /**商品外键*/
   @TableField("fk_productId")
   private Integer poductId;
   /**商品*/
   @TableField(exist = false)
   private ProductBean product;
   /**采购数量*/
   @TableField("o_num")
   private Integer num;
   /**采购价格*/
   @TableField("o_price")
   private Integer price;
   /**采购订单外键*/
   @TableField("fk_poId")
   private Integer purchaseOrderId;

   public OrderPInfoBean() {
   }

   public OrderPInfoBean(Integer poductId, Integer num, Integer price, Integer purchaseOrderId) {
      this.poductId = poductId;
      this.num = num;
      this.price = price;
      this.purchaseOrderId = purchaseOrderId;
   }

   public Integer getOdInfoId() {
      return odInfoId;
   }

   public void setOdInfoId(Integer odInfoId) {
      this.odInfoId = odInfoId;
   }

   public Integer getPoductId() {
      return poductId;
   }

   public void setPoductId(Integer poductId) {
      this.poductId = poductId;
   }

   public ProductBean getProduct() {
      return product;
   }

   public void setProduct(ProductBean product) {
      this.product = product;
   }

   public Integer getNum() {
      return num;
   }

   public void setNum(Integer num) {
      this.num = num;
   }

   public Integer getPrice() {
      return price;
   }

   public void setPrice(Integer price) {
      this.price = price;
   }

   public Integer getPurchaseOrderId() {
      return purchaseOrderId;
   }

   public void setPurchaseOrderId(Integer purchaseOrderId) {
      this.purchaseOrderId = purchaseOrderId;
   }

   @Override
   public String toString() {
      return "OrderPInfoBean{" +
              "odInfoId=" + odInfoId +
              ", poductId=" + poductId +
              ", product=" + product +
              ", num=" + num +
              ", price=" + price +
              ", purchaseOrderId=" + purchaseOrderId +
              "}\n";
   }
}
